package com.iotechn.unimall.app.api.drivercar;

import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.DrvierCarDO;
import com.iotechn.unimall.data.model.Page;

@HttpOpenApi(group = "drivercarapply", description = "足迹")
public interface DriverCarApplyappservice {

    @HttpMethod(description = "创建司机")
    public Object createDriverCarApply(
            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户ID") Long userId,
            @NotNull @HttpParam(name = "drvier", type = HttpParamType.COMMON, description = "申请单") DrvierCarDO drvier
    ) throws ServiceException;

    @HttpMethod(description = "编辑司机")
    public Object updateDriverCarApply(
            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户ID") Long userId,
            @NotNull @HttpParam(name = "drvier", type = HttpParamType.COMMON, description = "申请单") DrvierCarDO drvier
    ) throws ServiceException;

    @HttpMethod(description = "编辑司机")
    public Object deleteDriverCarApply(
            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户ID") Long userId,
            @NotNull @HttpParam(name = "drvierId", type = HttpParamType.COMMON, description = "申请单") Long drvierId
    ) throws ServiceException;

    @HttpMethod(description = "可用司机列表")
    public Page<DrvierCarDO> driverCarPage(Integer pageNo, Integer pageSize) throws ServiceException;


    @HttpMethod(description = "预约司机")
    public Object reserveDriver(
            @NotNull @HttpParam(name = "userId", type = HttpParamType.USER_ID, description = "用户ID") Long userId
    ) throws ServiceException;
}
